package com.sunyard.dal.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.sunyard.dal.bo.operator.OperatorLoginBO;
import com.sunyard.dal.dto.LoginBackDTO;
import com.sunyard.dal.dto.znsTask.OperatorDTO;
import com.sunyard.dal.entity.Operator;
import com.sunyard.dal.vo.inspect.PcInspect;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SysInfoMapper {

    Operator getOperatorByOpName(OperatorLoginBO operatorLoginBO);


    Operator getOperatorByOpName(String opName);

    Integer updateOperator(Operator operator);

    Operator getOperatorByOpId(String opId);

    /**
     * @Description: 分页获取用户信息
     * @Author: jiy.fang
     * @Date: 2019/7/23 10:18
     */
    List<Operator> getListOperatorByPage(Map<String, Object> map);

    Operator getOperatorByEmployeeId(String employeeId);

    /**
     * @Description: 用户名是否存在
     * @Author: jiy.fang
     * @Date: 2019/7/23 18:10
     */
    Integer existOpName(String opName);

    /**
     * @Description: 根据机构id获取用户列表
     * @Author: jiy.fang
     * @Date: 2019/7/24 13:57
     */
    List<Operator> getListOperatorByOrgId(String orgId);

    int countOperatorByRoleId(String roleId);

    int insertOperator(Operator operator1);

    int deleteOperator(Operator operator1);

    LoginBackDTO getBackInfoByOpId(String opId);

    com.sunyard.dal.dto.OperatorDTO getOperatorDTOByOpId(String opId);

    int deleteOperatorByOrgId(String orgId);

    List<Operator> getListOperatorByroleId(String roleId);

    //查询被机构巡检客户经理
    List<PcInspect> selectInspect(@Param("orgId") String orgId);

    com.sunyard.dal.dto.OperatorDTO getOperatorDTOByOpName(String username);

    Operator getOperatorByOpNameString(@Param("opName") String opName);

    @DS("zhsdw1")
    int unlockOperator();

    Integer updateOperatorByOpName(Operator operator);

    /**
     * 获取超级管理员角色ID
     *
     * @return String
     * @author: guangw.dang
     * @Date: 2022/6/7 20:41
     **/
    String getAdminRoleId();

    List<Operator> getOperatorListByRoleOrg(Map<String, Object> queryMap);

    int updateOperatorByOpId(@Param("opId") String opId, @Param("roleId") String roleId, @Param("sublicense") String toOpId);

    int updateOperatorByOpId2(@Param("opId") String opId, @Param("roleId") String roleId, @Param("sublicenseStatus") String sublicenseStatus);

    int rollBackAuthority(@Param("opId") String opId, @Param("roleId") String roleId, @Param("sublicense") String toOpId);

    List<Operator> getOperatorByOrgIds(@Param("list") List<String> newBulletinOrgIdList);

    List<Operator> getOperatorByRealNames(@Param("list") List<String> realNames);

    Operator getOperatorById(String id);

    String queryByOpName(String name);

    Operator getOperatorBySublicense(String sublicense);

    int getOperatorCountByOrgId(@Param("orgIds") List<String> orgIds);

    int updateOperatorAuditStatus(Operator operator1);

    String getRoleIdByOpId(String opId);

    List<Operator> getOperators();

    List<OperatorDTO> findOperatorByOrg(@Param("orgId")String orgId, @Param("popedomId")String popedomId);
}